package com.inifitness.tenant.core.system.mapper;


import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.inifitness.tenant.core.config.mp.annotation.DataPermission;
import com.inifitness.tenant.core.system.model.bo.BizUserAcctBO;
import com.inifitness.tenant.core.system.model.dto.UserAuthInfo;
import com.inifitness.tenant.core.system.model.entity.BizUserAcct;
import com.inifitness.tenant.core.system.model.form.BizUserForm;
import com.inifitness.tenant.core.system.model.query.BizUserAcctPageQuery;
import com.inifitness.tenant.core.system.model.vo.BizUserExportVO;

import org.apache.ibatis.annotations.Mapper;

/**
 * 用户持久层
 *
 * @author sunjinfeng
 * @since 2024/04/18 11:00:00
 */
@Mapper
public interface BizUserAcctMapper extends BaseMapper<BizUserAcct> {

  /**
   * 获取用户分页列表
   *
   * @param page
   * @param queryParams 查询参数
   * @return
   */
  @DataPermission(deptAlias = "u")
  Page<BizUserAcctBO> listPagedUsers(Page<BizUserAcctBO> page, BizUserAcctPageQuery queryParams);

  /**
   * 获取用户表单详情
   *
   * @param userId 用户ID
   * @return
   */
  BizUserForm getUserFormData(Long userId);

  /**
   * 根据用户名获取认证信息
   *
   * @param username
   * @return
   */
  UserAuthInfo getUserAuthInfo(String username);

  /**
   * 获取导出用户列表
   *
   * @param queryParams
   * @return
   */
  @DataPermission(deptAlias = "u")
  List<BizUserExportVO> listExportUsers(BizUserAcctPageQuery queryParams);
}
